package com.xdcplus.web.common.enums.base;

/**
 * 物料类型
 * @author Fish.Fei
 */

public enum BaseMtrlTypeEnum {
    FP("001", "成品"),
    SFP("002", "半成品"),
    RM("003", "原料"),
    AM("004", "辅材"),
    QT("005", "其他"),
    ;

    private String code;

    private String msg;

    public static String getMsg(String code) {
        for (BaseMtrlTypeEnum ele : values()) {
            if(ele.getCode().equals(code)) {return ele.getMsg();}
        }
        return null;
    }

    BaseMtrlTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
